package de.baumann.browser.views.dialog

import android.content.Context
import android.view.View
import de.baumann.browser.R
import kotlinx.android.synthetic.main.dialog_update.*

class UpdateDialog(context: Context, var onClickListener: View.OnClickListener) : BaseDialog(context) {
    override fun laoutId(): Int {
        return R.layout.dialog_update
    }

    override fun initView() {
        btnUpdate.setOnClickListener {
            onClickListener.onClick(it)
            tvUpdateContent.text = "正在下载,请稍候..."
            it.isClickable = false
        }
    }

    fun setUpdateDesc(desc:String):UpdateDialog{
        tvUpdateContent.text = desc
        return this
    }


}